home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / fido / tllib5_4.lha / traplist.mod < prev   
Text File  |  1991-09-30  |  4KB  |  94 lines

  1. MODULE TrapList;
  2.  
  3. (**********************************************************************)
  4. (*                Traplist.library support definitions                *)
  5. (*   for use with the Oberon compiler, by Fridtjof Siebert © A+L AG   *)
  6. (*              Done by Roger Nordin (2:203/507@fidonet)              *)
  7. (*   Please send corrections/bug reports regarding this file to me!   *)
  8. (*                                                                    *)
  9. (*                   This version created 21-Sep-91                   *)
  10. (*                                                                    *)
  11. (*   Based on nl.h (02 Apr 1991), © Copyright by Martin J. Laubach.   *)
  12. (**********************************************************************)
  13.  
  14. IMPORT
  15.   e:Exec;
  16.  
  17. CONST
  18.   traplistName * = "traplist.library";
  19.   traplistVersion * = 4;
  20.  
  21.   verbatim     * = LONGSET{31}; (* Don't translate phone numbers, used by FindNL() *)
  22.  
  23.   parseInvalidChar   * = -1; (* Returned by NLParseAddr() *)
  24.   parseInvalidNumber * = -2;
  25.   
  26.   (* defined/reserved Tag IDs *)
  27.   
  28.   PASS * = 50415353H; (* password entry   *)
  29.   TCNF * = 55434E46H; (* TD config entry  *)
  30.   ACCT * = 41434354H; (* accounting entry *)
  31.   
  32. TYPE
  33.   AddrPtr * = POINTER TO Addr;
  34.   Addr * = STRUCT
  35.     zone  * : INTEGER;
  36.     net   * : INTEGER;
  37.     node  * : INTEGER;
  38.     point * : INTEGER;
  39.   END;
  40.   
  41.   (* This structure is returned by NLFind() and NLIndexFind() *)
  42.   
  43.   NodeDescPtr * = POINTER TO NodeDesc;
  44.   NodeDesc * = STRUCT
  45.     node      * : Addr;    (* node address *)
  46.     reserved  * : LONGINT;
  47.     region    * : INTEGER; (* region (0 if none) *)
  48.     hubNode   * : INTEGER; (* node # of this node's HUB (0 if none) *)
  49.     system    * : LONGINT; (* node name *)
  50.     sysop     * : LONGINT; (* sysop name *)
  51.     phone     * : LONGINT; (* phone number *)
  52.     city      * : LONGINT; (* city and state *)
  53.     passwd    * : LONGINT; (* password *)
  54.     flags     * : LONGINT; (* nodelist flags *)
  55.     cost      * : LONGINT; (* cost *)
  56.     baudRate  * : INTEGER; (* baud rate *)
  57.     id        * : LONGINT; (* unique ID (offset into nodeindex) *)
  58.   END;
  59.  
  60. VAR
  61.   traplist * : e.LibraryPtr;
  62.  
  63. PROCEDURE Open* {traplist,-36}(name{8}:ARRAY OF CHAR; flags{0}:LONGSET):LONGINT;
  64. PROCEDURE Close* {traplist,-42}(nodelist{8}:LONGINT);
  65. PROCEDURE Find* {traplist,-48}(nodelist{8}:LONGINT; address{9}:AddrPtr; flags{0}:LONGSET):NodeDescPtr;
  66. PROCEDURE FreeNode* {traplist,-54}(node{8}:NodeDescPtr);
  67. PROCEDURE AddrComp* {traplist,-60}(node1{8},node2{9}:AddrPtr):SHORTINT;
  68. PROCEDURE IndexFind* {traplist,-66}(nodelist{8}:LONGINT; address{9}:AddrPtr; flags{0}:LONGSET):NodeDescPtr;
  69. PROCEDURE ExtraFromNL* {traplist,-72}(nodelist{8}:LONGINT):LONGINT;
  70. PROCEDURE ExtraOpen* {traplist,-78}(path{8}:ARRAY OF CHAR):LONGINT;
  71. PROCEDURE ExtraClose* {traplist,-84}(xtra{8}:LONGINT);
  72. PROCEDURE ExtraFind* {traplist,-90}(xtra{8}:LONGINT; address{9}:AddrPtr; tag{0}:LONGINT; size{10}:LONGINT):LONGINT;
  73. PROCEDURE ExtraPut* {traplist,-96}(xtra{8}:LONGINT; address{9}:AddrPtr; tag{0}:LONGINT; size{1}:LONGINT; data{10}:LONGINT):BOOLEAN;
  74. PROCEDURE ExtraDel* {traplist,-102}(xtra{8}:LONGINT; data{9}:LONGINT);
  75. PROCEDURE ExtraFlush* {traplist,-114}(xtra{8}:LONGINT);
  76. PROCEDURE ExtraLock* {traplist,-120}(xtra{8}:LONGINT);
  77. PROCEDURE ExtraUnlock* {traplist,-126}(xtra{8}:LONGINT);
  78. PROCEDURE ExtraEnumNode* {traplist,-132}(xtra{8}:LONGINT; client{9}:LONGINT; user{10}:LONGINT):LONGINT;
  79. PROCEDURE ExtraChanged* {traplist,-138}(xtra{8}:LONGINT);
  80. PROCEDURE ExtraEnumTag* {traplist,-144}(xtra{8}:LONGINT; address{9}:AddrPtr; client{10}:LONGINT; user{11}:LONGINT):LONGINT;
  81. PROCEDURE EnumNode* {traplist,-150}(nodelist{8}:LONGINT; bufsize{0}:LONGINT; address{9}:AddrPtr; client{10}:LONGINT; user{11}:LONGINT):LONGINT;
  82. PROCEDURE ParseAddr* {traplist,-156}(addr{8}:AddrPtr; str{9}:ARRAY OF CHAR; default{10}:AddrPtr):LONGINT;
  83. PROCEDURE ExtraLockTag* {traplist,-168}(xtra{8}:LONGINT; tagdata{9}:LONGINT);
  84. PROCEDURE ExtraUnlockTag* {traplist,-174}(xtra{8}:LONGINT; tagdata{9}:LONGINT);
  85. PROCEDURE ExtraChange* {traplist,-180}(xtra{8}:LONGINT; address{9}:AddrPtr; tag{0}:LONGINT; size{1}:LONGINT; data{2}:LONGINT):BOOLEAN;
  86. PROCEDURE ExtraFindLock* {traplist, -186}(xtra{8}:LONGINT; address{9}:AddrPtr; tag{0}:LONGINT; size{10}:LONGINT):LONGINT;
  87.  
  88. BEGIN
  89.   traplist := e.OpenLibrary(traplistName,traplistVersion);
  90.   IF traplist = NIL THEN HALT(20); END;
  91. CLOSE
  92.   e.CloseLibrary(traplist);
  93. END TrapList.
  94.